package com.jule.teenpatti.mail.dao.mapper;

import com.jule.teenpatti.mail.dao.bean.MailConfigModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MailConfigModelMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MailConfigModel record);

    MailConfigModel selectByPrimaryKey(Integer id);
    /**获取未过期的指定配置Id的邮件且不是指定玩家的邮件配置*/
    MailConfigModel selectByIdExpireTime(@Param("id") Integer id, @Param("expire_time") long currentTimeMillis);

    List<MailConfigModel> selectAll();

    /**获取未过期并且不是指定玩家的邮件配置*/
    List<MailConfigModel> selectAllByExpireTime(@Param("expire_time") long currentTimeMillis);

    int updateByPrimaryKey(MailConfigModel record);
}